import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';

export const columns: BasicColumn[] = [
  {
    title: '受检单位',
    align: 'center',
    dataIndex: 'entName',
  },
  {
    title: '受检单位代表',
    align: 'center',
    dataIndex: 'entPerson',
  },
  {
    title: '产品名称',
    align: 'center',
    dataIndex: 'tailName',
  },
  {
    title: '产品材质',
    align: 'center',
    dataIndex: 'tailMaterial',
  },
  {
    title: '规格型号',
    align: 'center',
    dataIndex: 'tailModel',
  },
  {
    title: '生产厂家',
    align: 'center',
    dataIndex: 'tailFactory',
  },
  {
    title: '产品批号',
    align: 'center',
    dataIndex: 'tailBatch',
  },
  {
    title: '产品等级',
    align: 'center',
    dataIndex: 'tailRank',
    width: 95,
  },
  {
    title: '检验类别',
    align: 'center',
    dataIndex: 'checkType',
    width: 95,
  },
  {
    title: '单据状态',
    align: 'center',
    dataIndex: 'auditMark',
    width: 95,
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '受检单位',
    field: 'entName',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    label: '经办日期',
    field: 'handlDate',
    component: 'DatePicker',
    colProps: { span: 6 },
  },
  {
    label: '产品名称',
    field: 'tailName',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    label: '生成厂家',
    field: 'tailFactory',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    label: '检验类别',
    field: 'checkType',
    component: 'Input',
    colProps: { span: 6 },
  },
  {
    label: '抽样方式',
    field: 'spotWay',
    component: 'Input',
    colProps: { span: 6 },
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '受检单位',
    field: 'entName',
    component: 'Input',
  },
  {
    label: '抽样人',
    field: 'spotPerson',
    component: 'Input',
  },
  {
    label: '陪同抽样人',
    field: 'peerSpotPerson',
    component: 'Input',
  },
  {
    label: '受检单位代表',
    field: 'entPerson',
    component: 'Input',
  },
  {
    label: '经办人',
    field: 'handler',
    component: 'Input',
  },
  {
    label: '经办日期',
    field: 'handlDate',
    component: 'DatePicker',
  },
  {
    label: '产品名称',
    field: 'tailName',
    component: 'Input',
  },
  {
    label: '产品八位码',
    field: 'tailCode',
    component: 'Input',
  },
  {
    label: '产品材质',
    field: 'tailMaterial',
    component: 'Input',
  },
  {
    label: '规格型号',
    field: 'tailModel',
    component: 'Input',
  },
  {
    label: '生成厂家',
    field: 'tailFactory',
    component: 'Input',
  },
  {
    label: '生产日期',
    field: 'tailDate',
    component: 'DatePicker',
  },
  {
    label: '产品状态',
    field: 'tailState',
    component: 'Input',
  },
  {
    label: '产品批号',
    field: 'tailBatch',
    component: 'Input',
  },
  {
    label: '产品包装',
    field: 'tailPackage',
    component: 'Input',
  },
  {
    label: '入库日期',
    field: 'tailWareDate',
    component: 'DatePicker',
  },
  {
    label: '产品等级',
    field: 'tailRank',
    component: 'Input',
  },
  {
    label: '存放条件',
    field: 'tailStorage',
    component: 'Input',
  },
  {
    label: '检验类别',
    field: 'checkType',
    component: 'Input',
  },
  {
    label: '样品大类id',
    field: 'sampleTypeId',
    component: 'Input',
  },
  {
    label: '样品大类',
    field: 'sampleType',
    component: 'Input',
  },
  {
    label: '样品类别id',
    field: 'sampleSortId',
    component: 'Input',
  },
  {
    label: '样品类别',
    field: 'sampleSort',
    component: 'Input',
  },
  {
    label: '实验项目ids',
    field: 'testItemsIds',
    component: 'Input',
  },
  {
    label: '检测项目',
    field: 'testItems',
    component: 'Input',
  },
  {
    label: '采购合同',
    field: 'contract',
    component: 'Input',
  },
  {
    label: '合同附件',
    field: 'criterionAtta',
    component: 'Input',
  },
  {
    label: '采购技术规格书',
    field: 'technical',
    component: 'Input',
  },
  {
    label: '产品合格证',
    field: 'certificate',
    component: 'Input',
  },
  {
    label: '产品质量证明书',
    field: 'quality',
    component: 'Input',
  },
  {
    label: '抽样单位',
    field: 'spotEntName',
    component: 'Input',
  },
  {
    label: '抽样地点',
    field: 'spotAddress',
    component: 'Input',
  },
  {
    label: '抽样时间',
    field: 'spotDate',
    component: 'DatePicker',
  },
  {
    label: '抽样基数',
    field: 'spotBase',
    component: 'Input',
  },
  {
    label: '抽取样品量',
    field: 'spotAmount',
    component: 'Input',
  },
  {
    label: '抽样方式',
    field: 'spotWay',
    component: 'Input',
  },
  {
    label: '样品储运方式',
    field: 'spotStoreWay',
    component: 'Input',
  },
  {
    label: '封样形式',
    field: 'spotSealed',
    component: 'Input',
  },
  {
    label: '供方类别',
    field: 'spotCategory',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  // TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
